﻿<Window x:Class="CSSAdriverapp.UpdateActivity"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Update Activity" Height="327" Width="653" xmlns:my="clr-namespace:CSSAdriverapp" ResizeMode="NoResize">
    <Grid Background="#C5AFB1AF">
         <Label Height="28" HorizontalAlignment="Left" Margin="239,0,0,0" Name="errorLabel" VerticalAlignment="Top" Width="132" Content="Error" />
        <DataGrid AutoGenerateColumns="False" Height="195" HorizontalAlignment="Left" Margin="12,34,0,0" Name="activityDataGrid" VerticalAlignment="Top" Width="429" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:UpdateActivity, AncestorLevel=1}, Path=activites}"  AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=activityid}" Header="ID" />
                <DataGridTextColumn Binding="{Binding Path=activity_name}" Header="Name" />
            </DataGrid.Columns>
        </DataGrid>
        <DataGrid AutoGenerateColumns="False" Height="195" HorizontalAlignment="Left" Margin="466,34,0,0" Name="vehicleDataGrid" VerticalAlignment="Top" Width="135" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:UpdateActivity, AncestorLevel=1}, Path=activities}" AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" SelectionChanged="vehicleDataGrid_SelectionChanged" CanUserAddRows="false" GridLinesVisibility="None">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=Name}" Header="Name" />
            </DataGrid.Columns>
        </DataGrid>
        <Label Content="Vehicle" Height="28" HorizontalAlignment="Left" Margin="512,0,0,0" Name="vehicleLabel" VerticalAlignment="Top" />
        <Button Content="Update Activity" Height="23" HorizontalAlignment="Left" Margin="486,245,0,0" Name="updateActivityButton" VerticalAlignment="Top" Width="99" Click="updateActivityButton_Click" />
    </Grid>
</Window>
